package sivan.annotation;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;

public class SpringApplication {

    public static void run() {
        Tomcat tomcat = new Tomcat();
        tomcat.setPort(8080);
        try {
            tomcat.addWebapp("/","D:\\springDemo\\");
            tomcat.start();
            tomcat.getServer().await();
        } catch (LifecycleException ex) {
            System.out.println(ex.getMessage());
        }
    }
}
